package com.ajocer.springbootinit.config;

import com.ajocer.springbootinit.rag.SimpleMilvusVectorStore;
import dev.langchain4j.data.segment.TextSegment;
import dev.langchain4j.store.embedding.EmbeddingStore;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * RAG系统配置类
 */
@Configuration
public class RagConfig {

    /**
     * 配置向量存储
     * 使用SimpleMilvusVectorStore替代原始的MilvusVectorStore
     */
    @Bean
    @Primary
    public EmbeddingStore<TextSegment> embeddingStore(SimpleMilvusVectorStore simpleMilvusVectorStore) {
        return simpleMilvusVectorStore;
    }
} 